
def foo(m,n):
	def bar(li,va):
		if(va==0):
			return [[]]
		lst_li=lst[li]
		if(va<lst_li):
			return []
		if(li==len(lst)-1):
			if(lst_li==va):
				return [[lst_li]]
			return []
		with_i_list=[]
		with_i=bar(li+1,va-lst_li)
		if with_i:
			with_i_list= [[lst_li]+j for j in with_i]
		without_i=bar(li+1,va)
		return with_i_list+without_i

	lst=range(n+1)[1:]
	print bar(0,m)

foo(10,input())